home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / comsh17.arc / COMSH.HLP < prev    next >
Text File  |  1985-06-03  |  8KB  |  292 lines

  1. Version 1.6 Commands:                        7-May-84
  2.  
  3.  
  4. com        -- switch to communications mode
  5.  
  6. cb        -- switch to communications mode, with windowing to make
  7.            usage in CB pleasant.  (Note you must be in half duplex
  8.            mode to use this effectively).
  9.  
  10. exit        -- return to DOS
  11.  
  12. set        -- Manipulate function key assignments
  13.            set            -- list the current assignments
  14.            set key string    -- make an assignment.  E.g.:
  15.                         set f1 "ls"
  16.            Note that function keys are called f1 ... f10, shifted
  17.            are called s1 ... s10, alted a1 ... a10.
  18.  
  19. stty        -- set terminal parameters:
  20.            stty <nn>    -- run at <nn> baud (e.g., 300, 1200, etc.)
  21.            stty 80    -- Switch to 80 column B&W
  22.            stty 40    -- Switch to 40 column B&W
  23.            stty w       -- accept VIDTEX switch to wide character
  24.            stty -w      -- screw that, I didn't buy this computer
  25.                       to make it look like an apple
  26.            stty v    -- Treat ESC I as a vidtex poll sequence even
  27.                    when the idiots forgot to sen the SI first
  28.            stty -v    -- Do as a VT52 with a ESC I unless in protcol
  29.                    mode (idiotic people at CIS...mutter curse)
  30.            stty f    -- doesn't work yet
  31.            stty -f    -- I told you so.
  32.            stty echo    -- Remote echo
  33.            stty -echo    -- Local echo
  34.            stty 7       -- "and" all incoming characters with 0x7F
  35.            stty 8    -- Allow 8 bit (graphics) characters
  36.            stty 1    -- Use only screen 0 (monochrome/Tandy 2000)
  37.            stty 4    -- Use all 4 screens (IBM/CGA)
  38.  
  39.  
  40. cat        -- aka type to non-UNIX fans:
  41.            cat <file>    -- print out the contents of <file>
  42.  
  43. switch <n>    -- switch to screen <n>
  44.  
  45. clear        -- clear the screen
  46.  
  47. cap        -- menu based capture buffer control
  48.  
  49. xmodem        -- Perform an XMODEM style file transfer
  50.            xmodem -rt <file>    -- receive a text file into <file>
  51.            xmodem -rb <file>    -- receive a binary file into <file>
  52.            xmodem -s  <file>    -- transmit a file named <file>
  53.  
  54. sendf        -- send a file, no error checking protocol
  55.            sendf <file>        -- sends the file without linefeeds
  56.            sendf -l <file>    -- sends linefeeds and all
  57.  
  58. ls <drive>    -- shows the files on [optionally] specified drive
  59. more <file>    -- similar to type, but pauses every so often so you don't
  60.            feel like it's a speed reading course.  <space> gets
  61.            you one more line, <return> another screen full.
  62.  
  63. dial        -- Do funny things to the phone:
  64.            dial            -- prints a list of known #s
  65.            dial <name>        -- place a local call to <name>
  66.            dial <name> <car>    -- place a long distance call to
  67.                        computer <name> using the long
  68.                        distance service <car>
  69. ap   <file1> <file2>    -- append file1 to file2
  70. apl  <file>  <text>    -- Appends the line of <text> to the end of <file>
  71. cp   <file1> <file2>    -- copies file1 to file2
  72. grep <pat>   <file>    -- Print all lines in file <file> with <pat> in them
  73. mv   <file1> <file2>    -- Renames file1 to file2
  74. rm   <files>        -- Deletes the specified files.  rm will happily get
  75.                rid of everything if you rm *.* <caveat>
  76. sleep <time>        -- sleep <time> seconds.  Used primarily for waiting
  77.                for the Hayes to let you talk to the world after
  78.                it says "CONNECT".
  79. send "<message>"    -- transmits <message> to the modem (or whomever is
  80.                listening to the modem, eg., CIS).  Note that
  81.                "\m" is control-m, "\c" is control-c, ... etc.
  82. wait            -- waits one of several patterns to appear in the
  83.                stream of data from the modem.
  84. open            -- opens the capture buffer
  85. close            -- closes the capture buffer
  86. write <file>        -- appends the contents of the capture buffer to the
  87.                end of the specified file.
  88. echo <text>        -- prints <text> out on the screen
  89.  
  90. misfort            -- Used to generate and transmit "fortunes"
  91.                (details TK)
  92.  
  93. wc <file>        -- compute number of chars, words, and lines in <file>
  94.  
  95. read <var>        -- reads one line of text from terminal into variable
  96.  
  97. pwd            -- prints the current directory (DOS 2.0)
  98.  
  99. cd <path>        -- change directory (use of "/" instead of "\" is OK)
  100. pattern            -- Define the patterns being watched for in the
  101.                stream of text from the modem:
  102.  
  103.         pattern reset        -- reset all patterns to inactive
  104.         pattern reset n        -- resets pattern n (0..9) to inactive
  105.         pattern n "pattern"    -- defines pattern n to match contents
  106.                        of quotes  Note that \m is etc.
  107.  
  108. if        -- Conditional branch:
  109.  
  110.            if match n <label>    -- if the wait terminated because
  111.                        pattern n was seen, goto <label>
  112.            if !match n <label>    -- if ... any but pattern n ...
  113.  
  114.            if same <a> <b> <label>    -- If a==b, goto label
  115.            if !same <a> <b> <label>    -- if a!=b, goto label
  116.  
  117.            if !fexist <file> <label>    -- if <file> doesn't exist...
  118.  
  119. goto <label>    -- Unconditional branch
  120.  
  121. : <label>    -- Branch target.  Must have *exatcly* one space between colon
  122.            and <label>.  Also useful for comments.
  123.  
  124. <name>        -- Invokes a "script" of commands.  If there is a file called
  125.            <name>.csh, it will be used for commands.  Nesting up to
  126.            five levels permited.
  127.  
  128. Multiple commands on the same line can be given by seperating them with a
  129. semi-colon, e.g.:
  130.     send "AT\m" ; wait "OK" ; sleep 1 ; send "ATDT7582090\m" ; com
  131.  
  132. Communications mode commands:  (initial settings):
  133.  
  134. F1    -- prints help file which isn't writen yet.
  135. F2    -- invokes the "sendf" command with prompts.
  136. F3    -- same as "cap" command.
  137. F4    -- clear the screen
  138. F9    -- send "\o\m"
  139. F10    -- accepts one command from keyboard, executes it, returns to
  140.        com.  Note that the command can be a script, or even, gasp,
  141.        "com", which would leave you running the communications package
  142.        under the command interpreter which is running under the
  143.        communications package which is ultimately under the command
  144.        interpreter ..... doing this sort of thing too deeply could
  145.        leave you back in DOS with a terse message "NO CORE"...
  146.  
  147. SHIFT-F1    -- Exit back to command mode
  148.  
  149. ALT-F1        -- switch 0
  150. ALT-F2        -- switch 1
  151. ALT-F3        -- switch 2
  152. ALT-F4        -- switch 3
  153.  
  154.  
  155.  
  156.  
  157. An example phone.num (which is where phone numbers reside):
  158.  
  159.  
  160.     cis0:7584114:300:CompuServe 300 baud only
  161.     cis1:7582090:1200,300:CompuServe 1200/300
  162.     pcbbsnyc:541-5975:1200,300:PC BBS in NYC
  163.  
  164.  
  165. An example "carrier" file (att.) (two lines):
  166.  
  167.     1-
  168.     ,
  169.  
  170.  
  171. An example "carrier" file (mci.) (two lines also):
  172.  
  173.     6354192,,,,ddddd-
  174.     ,
  175.  
  176.  
  177. (Note that "ddddd" is the MCI access code).
  178.  
  179. An example login.csh file:
  180.  
  181.  
  182.     pattern reset
  183.     pattern 1 CONNECT
  184.     pattern 2 CARRIER ; :        As in "NO CARRIER"
  185.     echo Dialing CIS now...
  186.     send ATDT7582090\m
  187.     wait
  188.     if match 1 connect
  189.     echo Trying alternate number...
  190.     send ATDT7584114\m
  191.     wait
  192.     if match 1 connect
  193.     echo Failure!
  194.     goto end
  195.     : connect
  196.     echo Connection made..
  197.     pattern reset
  198.     pattern 1 ":"
  199.     sleep 1
  200.     send \c
  201.     wait
  202.     send 76703,373\m ; : My ppn .. probably best to change to yours!
  203.     wait
  204.     send "this isn't my password\m"
  205.     : end
  206.  
  207.  
  208.  
  209. Here's a script (progra.csh) to run through The programmer's SIG and
  210. read all new messages.
  211.  
  212.  
  213.     pattern reset
  214.     pattern 0 unction:
  215.     open
  216.     send "go pcs158\m"
  217.     wait
  218.     pattern 0 "RE T)"
  219.     pattern 1 unction:
  220.     send rn\m
  221.     : loop
  222.     wait
  223.     if match 1 end
  224.     send \m
  225.     goto loop
  226.     : end
  227.     close
  228.     write b:progra.tmp
  229.  
  230.  
  231.  
  232. Here's the script I use to visit the IBM SIG (ibmsig.csh) to come in,
  233. catch *my* messages, do a qsn, and then set the high message counter:
  234.  
  235.  
  236.     pattern reset
  237.     pattern 0 unction:
  238.     open
  239.     send "go pcs131\m"
  240.     wait
  241.     pattern 0 "(C RE T)"
  242.     pattern 1 unction:
  243.     send rm\m
  244.     : loop
  245.     wait
  246.     if match 1 qsn
  247.     send \m
  248.     goto loop
  249.     : qsn
  250.     pattern reset
  251.     pattern 0 unction:
  252.     send qsn\m
  253.     wait
  254.     pattern 1 "(C RE T)"
  255.     send "rr;n\m"
  256.     wait
  257.     close
  258.     write b:ibmsig.tmp
  259.     send t\m
  260.  
  261.  
  262. Here's a script that maintains and accesses a "database" of people's names
  263. and PPNS (This is called "who.csh", and maintains the database "who.dat".
  264. To add a ppn, give the command "who -add", otherwise, say "who <pattern>"
  265. to receive a list of all names/ppns with <pattern> in them.):
  266.  
  267.     if !same $$ 2 usage
  268.     if !fexist who.dat nodata
  269.     if same $1 -add addname
  270.     grep $1 who.dat
  271.     goto end
  272.     : usage
  273.     echo "usage: who <ppn> | <name> | -add"
  274.     goto end
  275.     : nodata
  276.     echo "no file who.dat to search"
  277.     goto end
  278.     : addname
  279.     echo -n "PPN to add:"
  280.     read 1
  281.     echo -n "Name to add:"
  282.     read 2
  283.     apl who.dat $1 "\i" $2
  284.     goto end
  285.     : end
  286.  
  287.  
  288. [end]
  289. ame
  290.     echo -n "PPN to add:"
  291.     read 1
  292.